Virtual Clock
The book has now been published and the content of this chapter has likely changed substanstially.Make the system clock a substitutable dependency that allows replacement of the default implementation by a Test Double.
We can have a hard time unit-testing code that depends on the system clock. This paper describes both the problem and a common, reusable solution.
Full description is available at: http://www.nusco.org/docs/virtual_clock.pdf.
Copyright © 2003-2008 Gerard Meszaros all rights reserved